package com.nstar.pum.view
{
	import com.nstar.base.util.SystemUtils;
	
	public class MoneyFactory
	{
		public static const M_RMB:String = "RMB";
		public static const M_US:String = "US";
		public static const M_EURO:String = "EURO";
		
		private var values:Array;
		
		public function MoneyFactory()
		{
		}
		
		public static function createRandomMoney(type:String,values:Array,duration:int,moneys:Array):Money{
			var randomIndex:Number = SystemUtils.randRange(0,values.length-1);
			trace(randomIndex+","+(moneys.length-1));
			var w:Number = moneys[randomIndex].width;
			var h:Number = moneys[randomIndex].height;
			var url:String = moneys[randomIndex].url;
			return new Money(values[randomIndex],values,duration,w,h,url);
			/* 
			switch(type){
				case M_US:
					return new USMoney(values[randomIndex],values,duration,w,h,url);
				case M_RMB:
					return new RMBMoney(values[randomIndex],values,duration,w,h,url);
				case M_EURO:
					return new EUROMoney(values[randomIndex],values,duration,w,h,url);
			}
			 */
			return null;
		} 

	}
}